package com.factory._07decorator;

/**
 * @author Qinye
 * @date 2023/8/11 23:23
 */
//第四步：具体口味（ConcreteDecorator）：加冰和加咖啡
public class AddIceTaste extends Taste {
    private String desciption = "奶茶加冰...";
    private MilkTea milkTea = null;

    public AddIceTaste(MilkTea milkTea) {
        this.milkTea = milkTea;
    }

    @Override
   public String  milkTeaName(){
        return milkTea.milkTeaName() + " " + desciption;
    }

    @Override
    public int milkTeaPrice() {
        return milkTea.milkTeaPrice()+5;
    }

}
